home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / gui / mui / mui14-dv.lha / MUI / Developer / Assembler / Include / libraries / mui.i < prev   
Encoding:
Text File  |  1993-10-28  |  63.0 KB  |  1,880 lines

  1. ****************************************************************************
  2. **
  3. ** MUI - MagicUserInterface
  4. ** (c) 1993 by Stefan Stuntz
  5. **
  6. ** Main Header File
  7. **
  8. *** Assembler modifications 26-Aug-93 by Henri VeisterĪ£.
  9. **
  10. ****************************************************************************
  11. ** General Header File Information
  12. ****************************************************************************
  13. **
  14. ** All macro and structure definitions follow these rules:
  15. **
  16. ** Name                       Meaning
  17. **
  18. ** MUIC_<class>               Name of a class
  19. ** MUIM_<class>_<method>      Method
  20. ** MUIP_<class>_<method>      Methods parameter structure
  21. ** MUIV_<class>_<method>_<x>  Special method value
  22. ** MUIA_<class>_<attrib>      Attribute
  23. ** MUIV_<class>_<attrib>_<x>  Special attribute value
  24. ** MUIE_<error>               Error return code from MUI_Error()
  25. ** MUII_<name>                Standard MUI image
  26. **
  27. ** MUIA_... attribute definitions are followed by a comment
  28. ** consisting of the three possible letters I, S and G.
  29. ** I: it's possible to specify this attribute at object creation time.
  30. ** S: it's possible to change this attribute with SetAttrs().
  31. ** G: it's possible to get this attribute with GetAttr().
  32. **
  33.  
  34.  
  35.    IFND LIBRARIES_MUI_I
  36. LIBRARIES_MUI_I SET 1
  37.  
  38.    IFND EXEC_TYPES_I
  39.    INCLUDE "exec/types.i"
  40.    ENDC  ;EXEC_TYPES_I
  41.  
  42.    IFND INTUITION_CLASSES_I
  43.    INCLUDE "intuition/classes.i"
  44.    ENDC  ;INTUITION_CLASSES_I
  45.  
  46.    IFND INTUITION_SCREENS_I
  47.    INCLUDE "intuition/screens.i"
  48.    ENDC  ;INTUITION_SCREENS_I
  49.  
  50.    IFND UTILITY_HOOKS_I
  51.    INCLUDE "utility/hooks.i"
  52.    ENDC  ;UTILITY_HOOKS_I
  53.  
  54.  
  55.  
  56. ****************************************************************************
  57. ** Library specification
  58. ****************************************************************************
  59.  
  60. MUIMASTER_NAME MACRO
  61.          dc.b     "muimaster.library",0
  62.          even
  63.          ENDM
  64. MUIMASTER_VMIN EQU 4
  65. CALLMUI  MACRO   ; Func
  66.          move.l   _MUIMasterBase(pc),a6
  67.          jsr      _LVO\1(a6)
  68.          ENDM
  69. NULL     equ      0
  70. TRUE     equ      1
  71. FALSE    equ      NULL
  72.  
  73.  
  74. ****************************************************************************
  75. ** ARexx Interface
  76. ****************************************************************************
  77.  
  78.  STRUCTURE MUI_Command,0
  79.    APTR     mc_Name
  80.    APTR     mc_Template
  81.    LONG     mc_Parameters
  82.    STRUCT   mc_Hook,h_SIZEOF
  83.    STRUCT   mc_Reserved,4*5
  84.    LABEL    MUI_Command_SIZEOF
  85.  
  86. MC_TEMPLATE_ID EQU ~0
  87.  
  88.  
  89. ****************************************************************************
  90. ** Return values for MUI_Error()
  91. ****************************************************************************
  92.  
  93. MUIE_OK                    EQU 0
  94. MUIE_OutOfMemory           EQU 1
  95. MUIE_OutOfGfxMemory        EQU 2
  96. MUIE_InvalidWindowObject   EQU 3
  97. MUIE_MissingLibrary        EQU 4
  98. MUIE_NoARexx               EQU 5
  99. MUIE_SingleTask            EQU 6
  100.  
  101.  
  102.  
  103. ****************************************************************************
  104. ** Standard MUI Images
  105. ****************************************************************************
  106.  
  107. MUII_WindowBack      EQU 0
  108. MUII_RequesterBack   EQU 1
  109. MUII_ButtonBack      EQU 2
  110. MUII_ListBack        EQU 3
  111. MUII_TextBack        EQU 4
  112. MUII_PropBack        EQU 5
  113. MUII_ActiveBack      EQU 6
  114. MUII_SelectedBack    EQU 7
  115. MUII_ListCursor      EQU 8
  116. MUII_ListSelect      EQU 9
  117. MUII_ListSelCur      EQU 10
  118. MUII_ArrowUp         EQU 11
  119. MUII_ArrowDown       EQU 12
  120. MUII_ArrowLeft       EQU 13
  121. MUII_ArrowRight      EQU 14
  122. MUII_CheckMark       EQU 15
  123. MUII_RadioButton     EQU 16
  124. MUII_Cycle           EQU 17
  125. MUII_PopUp           EQU 18
  126. MUII_PopFile         EQU 19
  127. MUII_PopDrawer       EQU 20
  128. MUII_PropKnob        EQU 21
  129. MUII_Drawer          EQU 22
  130. MUII_HardDisk        EQU 23
  131. MUII_Disk            EQU 24
  132. MUII_Chip            EQU 25
  133. MUII_Volume          EQU 26
  134. MUII_Count           EQU 27
  135.  
  136. MUII_BACKGROUND      EQU (128+0)
  137. MUII_SHADOW          EQU (128+1)
  138. MUII_SHINE           EQU (128+2)
  139. MUII_FILL            EQU (128+3)
  140. MUII_SHADOWBACK      EQU (128+4)
  141. MUII_SHADOWFILL      EQU (128+5)
  142. MUII_SHADOWSHINE     EQU (128+6)
  143. MUII_FILLBACK        EQU (128+7)
  144. MUII_FILLSHINE       EQU (128+8)
  145. MUII_SHINEBACK       EQU (128+9)
  146. MUII_FILLBACK2       EQU (128+10)
  147.  
  148.  
  149. ****************************************************************************
  150. ** Special values for some methods 
  151. ****************************************************************************
  152.  
  153. MUIV_TriggerValue       EQU $49893131
  154. MUIV_EveryTime          EQU $49893131
  155.  
  156. MUIV_Application_Save_ENV     EQU 0
  157. MUIV_Application_Save_ENVARC  EQU ~0
  158. MUIV_Application_Load_ENV     EQU 0
  159. MUIV_Application_Load_ENVARC  EQU ~0
  160.  
  161. MUIV_Application_ReturnID_Quit   EQU -1
  162.  
  163. MUIV_List_Insert_Top       EQU 0
  164. MUIV_List_Insert_Active    EQU -1
  165. MUIV_List_Insert_Sorted    EQU -2
  166. MUIV_List_Insert_Bottom    EQU -3
  167.  
  168. MUIV_List_Remove_First     EQU 0
  169. MUIV_List_Remove_Active    EQU -1
  170. MUIV_List_Remove_Last      EQU -2
  171.  
  172. MUIV_List_Select_Off       EQU 0
  173. MUIV_List_Select_On        EQU 1
  174. MUIV_List_Select_Toggle    EQU 2
  175. MUIV_List_Select_Ask       EQU 3
  176.  
  177. MUIV_List_Jump_Active      EQU -1
  178. MUIV_List_GetEntry_Active  EQU -1
  179. MUIV_List_Select_Active    EQU -1
  180.  
  181. MUIV_List_Redraw_Active    EQU -1
  182. MUIV_List_Redraw_All       EQU -2
  183.  
  184. MUIV_List_Exchange_Active  EQU -1
  185.  
  186.  
  187.  
  188.  
  189. ;****************************************************************************
  190. ;** Notify.mui 6.65 (26.10.93)                                             **
  191. ;****************************************************************************
  192.  
  193. ;** Methods **
  194.  
  195. MUIM_CallHook                  EQU $8042b96b
  196. MUIM_Notify                    EQU $8042c9cb
  197. MUIM_Set                       EQU $8042549a
  198. MUIM_SetAsString               EQU $80422590
  199. MUIM_WriteLong                 EQU $80428d86
  200. MUIM_WriteString               EQU $80424bf4
  201.  
  202. ;** Attributes **
  203.  
  204. MUIA_AppMessage                 EQU $80421955 ;** ..g struct AppMessage * **
  205. MUIA_HelpFile                   EQU $80423a6e ;** isg STRPTR            **
  206. MUIA_HelpLine                   EQU $8042a825 ;** isg LONG              **
  207. MUIA_HelpNode                   EQU $80420b85 ;** isg STRPTR            **
  208. MUIA_Revision                   EQU $80427eaa ;** ..g LONG              **
  209. MUIA_UserData                   EQU $80420313 ;** isg ULONG             **
  210. MUIA_Version                    EQU $80422301 ;** ..g LONG              **
  211.  
  212.  
  213.  
  214. ;****************************************************************************
  215. ;** Application.mui 6.57 (26.10.93)                                        **
  216. ;****************************************************************************
  217.  
  218. ;** Methods **
  219.  
  220. MUIM_Application_GetMenuCheck  EQU $8042c0a7
  221. MUIM_Application_GetMenuState  EQU $8042a58f
  222. MUIM_Application_Input         EQU $8042d0f5
  223. MUIM_Application_InputBuffered EQU $80427e59
  224. MUIM_Application_Load          EQU $8042f90d
  225. MUIM_Application_PushMethod    EQU $80429ef8
  226. MUIM_Application_ReturnID      EQU $804276ef
  227. MUIM_Application_Save          EQU $804227ef
  228. MUIM_Application_SetMenuCheck  EQU $8042a707
  229. MUIM_Application_SetMenuState  EQU $80428bef
  230. MUIM_Application_ShowHelp      EQU $80426479
  231.  
  232. ;** Attributes **
  233.  
  234. MUIA_Application_Active         EQU $804260ab ;** isg BOOL              **
  235. MUIA_Application_Author         EQU $80424842 ;** i.g STRPTR            **
  236. MUIA_Application_Base           EQU $8042e07a ;** i.g STRPTR            **
  237. MUIA_Application_Broker         EQU $8042dbce ;** ..g Broker *          **
  238. MUIA_Application_BrokerHook     EQU $80428f4b ;** isg struct Hook *     **
  239. MUIA_Application_BrokerPort     EQU $8042e0ad ;** ..g struct MsgPort *  **
  240. MUIA_Application_BrokerPri      EQU $8042c8d0 ;** i.g LONG              **
  241. MUIA_Application_Commands       EQU $80428648 ;** isg struct MUI_Command * **
  242. MUIA_Application_Copyright      EQU $8042ef4d ;** i.g STRPTR            **
  243. MUIA_Application_Description    EQU $80421fc6 ;** i.g STRPTR            **
  244. MUIA_Application_DiskObject     EQU $804235cb ;** isg struct DiskObject * **
  245. MUIA_Application_DoubleStart    EQU $80423bc6 ;** ..g BOOL              **
  246. MUIA_Application_DropObject     EQU $80421266 ;** is. Object *          **
  247. MUIA_Application_Iconified      EQU $8042a07f ;** .sg BOOL              **
  248. MUIA_Application_Menu           EQU $80420e1f ;** i.g struct NewMenu *  **
  249. MUIA_Application_MenuAction     EQU $80428961 ;** ..g ULONG             **
  250. MUIA_Application_MenuHelp       EQU $8042540b ;** ..g ULONG             **
  251. MUIA_Application_RexxMsg        EQU $8042fd88 ;** ..g struct RxMsg *    **
  252. MUIA_Application_RexxString     EQU $8042d711 ;** .s. STRPTR            **
  253. MUIA_Application_SingleTask     EQU $8042a2c8 ;** i.. BOOL              **
  254. MUIA_Application_Sleep          EQU $80425711 ;** .s. BOOL              **
  255. MUIA_Application_Title          EQU $804281b8 ;** i.g STRPTR            **
  256. MUIA_Application_Version        EQU $8042b33f ;** i.g STRPTR            **
  257. MUIA_Application_Window         EQU $8042bfe0 ;** i.. Object *          **
  258.  
  259.  
  260.  
  261. ;****************************************************************************
  262. ;** Window.mui 6.117 (26.10.93)                                            **
  263. ;****************************************************************************
  264.  
  265. ;** Methods **
  266.  
  267. MUIM_Window_GetMenuCheck       EQU $80420414
  268. MUIM_Window_GetMenuState       EQU $80420d2f
  269. MUIM_Window_ScreenToBack       EQU $8042913d
  270. MUIM_Window_ScreenToFront      EQU $804227a4
  271. MUIM_Window_SetCycleChain      EQU $80426510
  272. MUIM_Window_SetMenuCheck       EQU $80422243
  273. MUIM_Window_SetMenuState       EQU $80422b5e
  274. MUIM_Window_ToBack             EQU $8042152e
  275. MUIM_Window_ToFront            EQU $8042554f
  276.  
  277. ;** Attributes **
  278.  
  279. MUIA_Window_Activate            EQU $80428d2f ;** isg BOOL              **
  280. MUIA_Window_ActiveObject        EQU $80427925 ;** .sg Object *          **
  281. MUIA_Window_AltHeight           EQU $8042cce3 ;** i.g LONG              **
  282. MUIA_Window_AltLeftEdge         EQU $80422d65 ;** i.g LONG              **
  283. MUIA_Window_AltTopEdge          EQU $8042e99b ;** i.g LONG              **
  284. MUIA_Window_AltWidth            EQU $804260f4 ;** i.g LONG              **
  285. MUIA_Window_AppWindow           EQU $804280cf ;** i.. BOOL              **
  286. MUIA_Window_Backdrop            EQU $8042c0bb ;** i.. BOOL              **
  287. MUIA_Window_Borderless          EQU $80429b79 ;** i.. BOOL              **
  288. MUIA_Window_CloseGadget         EQU $8042a110 ;** i.. BOOL              **
  289. MUIA_Window_CloseRequest        EQU $8042e86e ;** ..g BOOL              **
  290. MUIA_Window_DefaultObject       EQU $804294d7 ;** isg Object *          **
  291. MUIA_Window_DepthGadget         EQU $80421923 ;** i.. BOOL              **
  292. MUIA_Window_DragBar             EQU $8042045d ;** i.. BOOL              **
  293. MUIA_Window_Height              EQU $80425846 ;** i.g LONG              **
  294. MUIA_Window_ID                  EQU $804201bd ;** isg ULONG             **
  295. MUIA_Window_InputEvent          EQU $804247d8 ;** ..g struct InputEvent * **
  296. MUIA_Window_LeftEdge            EQU $80426c65 ;** i.g LONG              **
  297. MUIA_Window_Menu                EQU $8042db94 ;** i.. struct NewMenu *  **
  298. MUIA_Window_NoMenus             EQU $80429df5 ;** .s. BOOL              **
  299. MUIA_Window_Open                EQU $80428aa0 ;** .sg BOOL              **
  300. MUIA_Window_PublicScreen        EQU $804278e4 ;** isg STRPTR            **
  301. MUIA_Window_RefWindow           EQU $804201f4 ;** is. Object *          **
  302. MUIA_Window_RootObject          EQU $8042cba5 ;** i.. Object *          **
  303. MUIA_Window_Screen              EQU $8042df4f ;** isg struct Screen *   **
  304. MUIA_Window_ScreenTitle         EQU $804234b0 ;** isg STRPTR            **
  305. MUIA_Window_SizeGadget          EQU $8042e33d ;** i.. BOOL              **
  306. MUIA_Window_SizeRight           EQU $80424780 ;** i.. BOOL              **
  307. MUIA_Window_Sleep               EQU $8042e7db ;** .sg BOOL              **
  308. MUIA_Window_Title               EQU $8042ad3d ;** isg STRPTR            **
  309. MUIA_Window_TopEdge             EQU $80427c66 ;** i.g LONG              **
  310. MUIA_Window_Width               EQU $8042dcae ;** i.g LONG              **
  311. MUIA_Window_Window              EQU $80426a42 ;** ..g struct Window *   **
  312.  
  313. MUIV_Window_ActiveObjectNone    EQU 0
  314. MUIV_Window_ActiveObjectNext    EQU -1
  315. MUIV_Window_ActiveObjectPrev    EQU -2
  316. MUIV_Window_AltHeightMinMax     EQU 0
  317. MUIV_Window_AltHeightVisible    EQU -100
  318. MUIV_Window_AltHeightScreen     EQU -200
  319. MUIV_Window_AltHeightScaled     EQU -1000
  320. MUIV_Window_AltLeftEdgeCentered EQU -1
  321. MUIV_Window_AltLeftEdgeMoused   EQU -2
  322. MUIV_Window_AltLeftEdgeNoChange EQU -1000
  323. MUIV_Window_AltTopEdgeCentered  EQU -1
  324. MUIV_Window_AltTopEdgeMoused    EQU -2
  325. MUIV_Window_AltTopEdgeDelta     EQU -3
  326. MUIV_Window_AltTopEdgeNoChange  EQU -1000
  327. MUIV_Window_AltWidthMinMax      EQU 0
  328. MUIV_Window_AltWidthVisible     EQU -100
  329. MUIV_Window_AltWidthScreen      EQU -200
  330. MUIV_Window_AltWidthScaled      EQU -1000
  331. MUIV_Window_HeightMinMax        EQU 0
  332. MUIV_Window_HeightVisible       EQU -100
  333. MUIV_Window_HeightScreen        EQU -200
  334. MUIV_Window_HeightScaled        EQU -1000
  335. MUIV_Window_HeightDefault       EQU -1001
  336. MUIV_Window_LeftEdgeCentered    EQU -1
  337. MUIV_Window_LeftEdgeMoused      EQU -2
  338. MUIV_Window_MenuNoMenu          EQU -1
  339. MUIV_Window_TopEdgeCentered     EQU -1
  340. MUIV_Window_TopEdgeMoused       EQU -2
  341. MUIV_Window_TopEdgeDelta        EQU -3
  342. MUIV_Window_WidthMinMax         EQU 0
  343. MUIV_Window_WidthVisible        EQU -100
  344. MUIV_Window_WidthScreen         EQU -200
  345. MUIV_Window_WidthScaled         EQU -1000
  346. MUIV_Window_WidthDefault        EQU -1001
  347.  
  348.  
  349. ;****************************************************************************
  350. ;** Area.mui 6.131 (26.10.93)                                              **
  351. ;****************************************************************************
  352.  
  353. ;** Methods **
  354.  
  355.  
  356. ;** Attributes **
  357.  
  358. MUIA_ApplicationObject          EQU $8042d3ee ;** ..g Object *          **
  359. MUIA_Background                 EQU $8042545b ;** is. LONG              **
  360. MUIA_BottomEdge                 EQU $8042e552 ;** ..g LONG              **
  361. MUIA_ControlChar                EQU $8042120b ;** i.. char              **
  362. MUIA_Disabled                   EQU $80423661 ;** isg BOOL              **
  363. MUIA_ExportID                   EQU $8042d76e ;** isg LONG              **
  364. MUIA_FixHeight                  EQU $8042a92b ;** i.. LONG              **
  365. MUIA_FixHeightTxt               EQU $804276f2 ;** i.. LONG              **
  366. MUIA_FixWidth                   EQU $8042a3f1 ;** i.. LONG              **
  367. MUIA_FixWidthTxt                EQU $8042d044 ;** i.. STRPTR            **
  368. MUIA_Font                       EQU $8042be50 ;** i.g struct TextFont * **
  369. MUIA_Frame                      EQU $8042ac64 ;** i.. LONG              **
  370. MUIA_FramePhantomHoriz          EQU $8042ed76 ;** i.. BOOL              **
  371. MUIA_FrameTitle                 EQU $8042d1c7 ;** i.. STRPTR            **
  372. MUIA_Height                     EQU $80423237 ;** ..g LONG              **
  373. MUIA_HorizWeight                EQU $80426db9 ;** i.. LONG              **
  374. MUIA_InnerBottom                EQU $8042f2c0 ;** i.. LONG              **
  375. MUIA_InnerLeft                  EQU $804228f8 ;** i.. LONG              **
  376. MUIA_InnerRight                 EQU $804297ff ;** i.. LONG              **
  377. MUIA_InnerTop                   EQU $80421eb6 ;** i.. LONG              **
  378. MUIA_InputMode                  EQU $8042fb04 ;** i.. LONG              **
  379. MUIA_LeftEdge                   EQU $8042bec6 ;** ..g LONG              **
  380. MUIA_Pressed                    EQU $80423535 ;** ..g BOOL              **
  381. MUIA_RightEdge                  EQU $8042ba82 ;** ..g LONG              **
  382. MUIA_Selected                   EQU $8042654b ;** isg BOOL              **
  383. MUIA_ShowSelState               EQU $8042caac ;** i.. BOOL              **
  384. MUIA_Timer                      EQU $80426435 ;** ..g LONG              **
  385. MUIA_TopEdge                    EQU $8042509b ;** ..g LONG              **
  386. MUIA_VertWeight                 EQU $804298d0 ;** i.. LONG              **
  387. MUIA_Weight                     EQU $80421d1f ;** i.. LONG              **
  388. MUIA_Width                      EQU $8042b59c ;** ..g LONG              **
  389. MUIA_Window                     EQU $80421591 ;** ..g struct Window *   **
  390. MUIA_WindowObject               EQU $8042669e ;** ..g Object *          **
  391.  
  392. MUIV_FontInherit                EQU 0
  393. MUIV_FontNormal                 EQU -1
  394. MUIV_FontList                   EQU -2
  395. MUIV_FontTiny                   EQU -3
  396. MUIV_FontFixed                  EQU -4
  397. MUIV_FontTitle                  EQU -5
  398. MUIV_FrameNone                  EQU 0
  399. MUIV_FrameButton                EQU 1
  400. MUIV_FrameImageButton           EQU 2
  401. MUIV_FrameText                  EQU 3
  402. MUIV_FrameString                EQU 4
  403. MUIV_FrameReadList              EQU 5
  404. MUIV_FrameInputList             EQU 6
  405. MUIV_FrameProp                  EQU 7
  406. MUIV_FrameGauge                 EQU 8
  407. MUIV_FrameGroup                 EQU 9
  408. MUIV_FramePopUp                 EQU 10
  409. MUIV_FrameVirtual               EQU 11
  410. MUIV_FrameCount                 EQU 12
  411. MUIV_InputModeNone              EQU 0
  412. MUIV_InputModeRelVerify         EQU 1
  413. MUIV_InputModeImmediate         EQU 2
  414. MUIV_InputModeToggle            EQU 3
  415.  
  416.  
  417. ;****************************************************************************
  418. ;** Rectangle.mui 6.47 (26.10.93)                                          **
  419. ;****************************************************************************
  420.  
  421.  
  422. ;****************************************************************************
  423. ;** Image.mui 6.61 (26.10.93)                                              **
  424. ;****************************************************************************
  425.  
  426. ;** Attributes **
  427.  
  428. MUIA_Image_FontMatch            EQU $8042815d ;** i.. BOOL              **
  429. MUIA_Image_FontMatchHeight      EQU $80429f26 ;** i.. BOOL              **
  430. MUIA_Image_FontMatchWidth       EQU $804239bf ;** i.. BOOL              **
  431. MUIA_Image_FreeHoriz            EQU $8042da84 ;** i.. BOOL              **
  432. MUIA_Image_FreeVert             EQU $8042ea28 ;** i.. BOOL              **
  433. MUIA_Image_OldImage             EQU $80424f3d ;** i.. struct Image *    **
  434. MUIA_Image_Spec                 EQU $804233d5 ;** i.. char *            **
  435. MUIA_Image_State                EQU $8042a3ad ;** is. LONG              **
  436.  
  437.  
  438.  
  439. ;****************************************************************************
  440. ;** Text.mui 6.60 (26.10.93)                                               **
  441. ;****************************************************************************
  442.  
  443. ;** Attributes **
  444.  
  445. MUIA_Text_Contents              EQU $8042f8dc ;** isg STRPTR            **
  446. MUIA_Text_HiChar                EQU $804218ff ;** i.. char              **
  447. MUIA_Text_PreParse              EQU $8042566d ;** isg STRPTR            **
  448. MUIA_Text_SetMax                EQU $80424d0a ;** i.. BOOL              **
  449. MUIA_Text_SetMin                EQU $80424e10 ;** i.. BOOL              **
  450.  
  451.  
  452.  
  453. ;****************************************************************************
  454. ;** String.mui 6.62 (26.10.93)                                             **
  455. ;****************************************************************************
  456.  
  457. ;** Attributes **
  458.  
  459. MUIA_String_Accept              EQU $8042e3e1 ;** isg STRPTR            **
  460. MUIA_String_Acknowledge         EQU $8042026c ;** ..g STRPTR            **
  461. MUIA_String_AttachedList        EQU $80420fd2 ;** i.. Object *          **
  462. MUIA_String_BufferPos           EQU $80428b6c ;** .sg LONG              **
  463. MUIA_String_Contents            EQU $80428ffd ;** isg STRPTR            **
  464. MUIA_String_DisplayPos          EQU $8042ccbf ;** .sg LONG              **
  465. MUIA_String_Format              EQU $80427484 ;** i.g LONG              **
  466. MUIA_String_Integer             EQU $80426e8a ;** isg ULONG             **
  467. MUIA_String_MaxLen              EQU $80424984 ;** i.. LONG              **
  468. MUIA_String_Reject              EQU $8042179c ;** isg STRPTR            **
  469. MUIA_String_Secret              EQU $80428769 ;** i.g BOOL              **
  470.  
  471. MUIV_String_FormatLeft          EQU 0
  472. MUIV_String_FormatCenter        EQU 1
  473. MUIV_String_FormatRight         EQU 2
  474.  
  475.  
  476. ;****************************************************************************
  477. ;** Prop.mui 6.73 (26.10.93)                                               **
  478. ;****************************************************************************
  479.  
  480. ;** Attributes **
  481.  
  482. MUIA_Prop_Entries               EQU $8042fbdb ;** isg LONG              **
  483. MUIA_Prop_First                 EQU $8042d4b2 ;** isg LONG              **
  484. MUIA_Prop_Horiz                 EQU $8042f4f3 ;** i.g BOOL              **
  485. MUIA_Prop_Visible               EQU $8042fea6 ;** isg LONG              **
  486.  
  487.  
  488.  
  489. ;****************************************************************************
  490. ;** Gauge.mui 6.56 (26.10.93)                                              **
  491. ;****************************************************************************
  492.  
  493. ;** Attributes **
  494.  
  495. MUIA_Gauge_Current              EQU $8042f0dd ;** isg LONG              **
  496. MUIA_Gauge_Divide               EQU $8042d8df ;** isg BOOL              **
  497. MUIA_Gauge_Horiz                EQU $804232dd ;** i.. BOOL              **
  498. MUIA_Gauge_Max                  EQU $8042bcdb ;** isg LONG              **
  499.  
  500.  
  501.  
  502. ;****************************************************************************
  503. ;** Scale.mui 6.50 (26.10.93)                                              **
  504. ;****************************************************************************
  505.  
  506. ;** Attributes **
  507.  
  508. MUIA_Scale_Horiz                EQU $8042919a ;** isg BOOL              **
  509.  
  510.  
  511.  
  512. ;****************************************************************************
  513. ;** Boopsi.mui 6.52 (26.10.93)                                             **
  514. ;****************************************************************************
  515.  
  516. ;** Attributes **
  517.  
  518. MUIA_Boopsi_Class               EQU $80426999 ;** isg struct IClass *   **
  519. MUIA_Boopsi_ClassID             EQU $8042bfa3 ;** isg char *            **
  520. MUIA_Boopsi_MaxHeight           EQU $8042757f ;** isg ULONG             **
  521. MUIA_Boopsi_MaxWidth            EQU $8042bcb1 ;** isg ULONG             **
  522. MUIA_Boopsi_MinHeight           EQU $80422c93 ;** isg ULONG             **
  523. MUIA_Boopsi_MinWidth            EQU $80428fb2 ;** isg ULONG             **
  524. MUIA_Boopsi_Object              EQU $80420178 ;** ..g Object *          **
  525. MUIA_Boopsi_Remember            EQU $8042f4bd ;** i.. ULONG             **
  526. MUIA_Boopsi_TagDrawInfo         EQU $8042bae7 ;** isg ULONG             **
  527. MUIA_Boopsi_TagScreen           EQU $8042bc71 ;** isg ULONG             **
  528. MUIA_Boopsi_TagWindow           EQU $8042e11d ;** isg ULONG             **
  529.  
  530.  
  531.  
  532. ;****************************************************************************
  533. ;** Colorfield.mui 6.13 (26.10.93)                                         **
  534. ;****************************************************************************
  535.  
  536. ;** Attributes **
  537.  
  538. MUIA_Colorfield_Blue            EQU $8042d3b0 ;** isg ULONG             **
  539. MUIA_Colorfield_Green           EQU $80424466 ;** isg ULONG             **
  540. MUIA_Colorfield_Red             EQU $804279f6 ;** isg ULONG             **
  541. MUIA_Colorfield_RGB             EQU $8042677a ;** isg ULONG *           **
  542.  
  543.  
  544.  
  545. ;****************************************************************************
  546. ;** List.mui 6.111 (27.10.93)                                              **
  547. ;****************************************************************************
  548.  
  549. ;** Methods **
  550.  
  551. MUIM_List_Clear                EQU $8042ad89
  552. MUIM_List_Exchange             EQU $8042468c
  553. MUIM_List_GetEntry             EQU $804280ec
  554. MUIM_List_Insert               EQU $80426c87
  555. MUIM_List_Jump                 EQU $8042baab
  556. MUIM_List_NextSelected         EQU $80425f17
  557. MUIM_List_Redraw               EQU $80427993
  558. MUIM_List_Remove               EQU $8042647e
  559. MUIM_List_Select               EQU $804252d8
  560. MUIM_List_Sort                 EQU $80422275
  561.  
  562. ;** Attributes **
  563.  
  564. MUIA_List_Active                EQU $8042391c ;** isg LONG              **
  565. MUIA_List_AdjustHeight          EQU $8042850d ;** i.. BOOL              **
  566. MUIA_List_AdjustWidth           EQU $8042354a ;** i.. BOOL              **
  567. MUIA_List_CompareHook           EQU $80425c14 ;** i.. struct Hook *     **
  568. MUIA_List_ConstructHook         EQU $8042894f ;** i.. struct Hook *     **
  569. MUIA_List_DestructHook          EQU $804297ce ;** i.. struct Hook *     **
  570. MUIA_List_DisplayHook           EQU $8042b4d5 ;** i.. struct Hook *     **
  571. MUIA_List_Entries               EQU $80421654 ;** ..g LONG              **
  572. MUIA_List_First                 EQU $804238d4 ;** ..g LONG              **
  573. MUIA_List_Format                EQU $80423c0a ;** isg STRPTR            **
  574. MUIA_List_MultiTestHook         EQU $8042c2c6 ;** i.. struct Hook *     **
  575. MUIA_List_Quiet                 EQU $8042d8c7 ;** .s. BOOL              **
  576. MUIA_List_Visible               EQU $8042191f ;** ..g LONG              **
  577.  
  578. MUIV_List_ActiveOff             EQU -1
  579. MUIV_List_ActiveTop             EQU -2
  580. MUIV_List_ActiveBottom          EQU -3
  581. MUIV_List_ActiveUp              EQU -4
  582. MUIV_List_ActiveDown            EQU -5
  583. MUIV_List_ActivePageUp          EQU -6
  584. MUIV_List_ActivePageDown        EQU -7
  585. MUIV_List_ConstructHookString   EQU -1
  586. MUIV_List_DestructHookString    EQU -1
  587.  
  588.  
  589. ;****************************************************************************
  590. ;** Floattext.mui 6.48 (26.10.93)                                          **
  591. ;****************************************************************************
  592.  
  593. ;** Attributes **
  594.  
  595. MUIA_Floattext_Justify          EQU $8042dc03 ;** isg BOOL              **
  596. MUIA_Floattext_SkipChars        EQU $80425c7d ;** is. STRPTR            **
  597. MUIA_Floattext_TabSize          EQU $80427d17 ;** is. LONG              **
  598. MUIA_Floattext_Text             EQU $8042d16a ;** isg STRPTR            **
  599.  
  600.  
  601.  
  602. ;****************************************************************************
  603. ;** Volumelist.mui 6.50 (26.10.93)                                         **
  604. ;****************************************************************************
  605.  
  606.  
  607. ;****************************************************************************
  608. ;** Scrmodelist.mui 6.15 (26.10.93)                                        **
  609. ;****************************************************************************
  610.  
  611. ;** Attributes **
  612.  
  613.  
  614.  
  615.  
  616. ;****************************************************************************
  617. ;** Dirlist.mui 6.50 (27.10.93)                                            **
  618. ;****************************************************************************
  619.  
  620. ;** Methods **
  621.  
  622. MUIM_Dirlist_ReRead            EQU $80422d71
  623.  
  624. ;** Attributes **
  625.  
  626. MUIA_Dirlist_AcceptPattern      EQU $8042760a ;** is. STRPTR            **
  627. MUIA_Dirlist_Directory          EQU $8042ea41 ;** is. STRPTR            **
  628. MUIA_Dirlist_DrawersOnly        EQU $8042b379 ;** is. BOOL              **
  629. MUIA_Dirlist_FilesOnly          EQU $8042896a ;** is. BOOL              **
  630. MUIA_Dirlist_FilterDrawers      EQU $80424ad2 ;** is. BOOL              **
  631. MUIA_Dirlist_FilterHook         EQU $8042ae19 ;** is. struct Hook *     **
  632. MUIA_Dirlist_MultiSelDirs       EQU $80428653 ;** is. BOOL              **
  633. MUIA_Dirlist_NumBytes           EQU $80429e26 ;** ..g LONG              **
  634. MUIA_Dirlist_NumDrawers         EQU $80429cb8 ;** ..g LONG              **
  635. MUIA_Dirlist_NumFiles           EQU $8042a6f0 ;** ..g LONG              **
  636. MUIA_Dirlist_Path               EQU $80426176 ;** ..g STRPTR            **
  637. MUIA_Dirlist_RejectIcons        EQU $80424808 ;** is. BOOL              **
  638. MUIA_Dirlist_RejectPattern      EQU $804259c7 ;** is. STRPTR            **
  639. MUIA_Dirlist_SortDirs           EQU $8042bbb9 ;** is. LONG              **
  640. MUIA_Dirlist_SortHighLow        EQU $80421896 ;** is. BOOL              **
  641. MUIA_Dirlist_SortType           EQU $804228bc ;** is. LONG              **
  642. MUIA_Dirlist_Status             EQU $804240de ;** ..g LONG              **
  643.  
  644. MUIV_Dirlist_SortDirsFirst      EQU 0
  645. MUIV_Dirlist_SortDirsLast       EQU 1
  646. MUIV_Dirlist_SortDirsMix        EQU 2
  647. MUIV_Dirlist_SortTypeName       EQU 0
  648. MUIV_Dirlist_SortTypeDate       EQU 1
  649. MUIV_Dirlist_SortTypeSize       EQU 2
  650. MUIV_Dirlist_StatusInvalid      EQU 0
  651. MUIV_Dirlist_StatusReading      EQU 1
  652. MUIV_Dirlist_StatusValid        EQU 2
  653.  
  654.  
  655. ;****************************************************************************
  656. ;** Group.mui 6.168 (26.10.93)                                             **
  657. ;****************************************************************************
  658.  
  659. ;** Methods **
  660.  
  661.  
  662. ;** Attributes **
  663.  
  664. MUIA_Group_ActivePage           EQU $80424199 ;** isg LONG              **
  665. MUIA_Group_Child                EQU $804226e6 ;** i.. Object *          **
  666. MUIA_Group_Columns              EQU $8042f416 ;** is. LONG              **
  667. MUIA_Group_Horiz                EQU $8042536b ;** i.. BOOL              **
  668. MUIA_Group_HorizSpacing         EQU $8042c651 ;** is. LONG              **
  669. MUIA_Group_PageMode             EQU $80421a5f ;** is. BOOL              **
  670. MUIA_Group_Rows                 EQU $8042b68f ;** is. LONG              **
  671. MUIA_Group_SameHeight           EQU $8042037e ;** i.. BOOL              **
  672. MUIA_Group_SameSize             EQU $80420860 ;** i.. BOOL              **
  673. MUIA_Group_SameWidth            EQU $8042b3ec ;** i.. BOOL              **
  674. MUIA_Group_Spacing              EQU $8042866d ;** is. LONG              **
  675. MUIA_Group_VertSpacing          EQU $8042e1bf ;** is. LONG              **
  676.  
  677.  
  678.  
  679. ;****************************************************************************
  680. ;** Virtgroup.mui 6.42 (26.10.93)                                          **
  681. ;****************************************************************************
  682.  
  683. ;** Methods **
  684.  
  685.  
  686. ;** Attributes **
  687.  
  688. MUIA_Virtgroup_Height           EQU $80423038 ;** ..g LONG              **
  689. MUIA_Virtgroup_Left             EQU $80429371 ;** isg LONG              **
  690. MUIA_Virtgroup_Top              EQU $80425200 ;** isg LONG              **
  691. MUIA_Virtgroup_Width            EQU $80427c49 ;** ..g LONG              **
  692.  
  693.  
  694.  
  695. ;****************************************************************************
  696. ;** Scrollgroup.mui 6.48 (26.10.93)                                        **
  697. ;****************************************************************************
  698.  
  699. ;** Attributes **
  700.  
  701. MUIA_Scrollgroup_Contents       EQU $80421261 ;** i.. Object *          **
  702.  
  703.  
  704.  
  705. ;****************************************************************************
  706. ;** Scrollbar.mui 6.52 (26.10.93)                                          **
  707. ;****************************************************************************
  708.  
  709.  
  710. ;****************************************************************************
  711. ;** Listview.mui 6.55 (26.10.93)                                           **
  712. ;****************************************************************************
  713.  
  714. ;** Attributes **
  715.  
  716. MUIA_Listview_DoubleClick       EQU $80424635 ;** i.g BOOL              **
  717. MUIA_Listview_Input             EQU $8042682d ;** i.. BOOL              **
  718. MUIA_Listview_List              EQU $8042bcce ;** i.. Object *          **
  719. MUIA_Listview_MultiSelect       EQU $80427e08 ;** i.. BOOL              **
  720. MUIA_Listview_SelectChange      EQU $8042178f ;** ..g BOOL              **
  721.  
  722.  
  723.  
  724. ;****************************************************************************
  725. ;** Radio.mui 6.45 (26.10.93)                                              **
  726. ;****************************************************************************
  727.  
  728. ;** Attributes **
  729.  
  730. MUIA_Radio_Active               EQU $80429b41 ;** isg LONG              **
  731. MUIA_Radio_Entries              EQU $8042b6a1 ;** i.. STRPTR *          **
  732.  
  733.  
  734.  
  735. ;****************************************************************************
  736. ;** Cycle.mui 6.68 (27.10.93)                                              **
  737. ;****************************************************************************
  738.  
  739. ;** Attributes **
  740.  
  741. MUIA_Cycle_Active               EQU $80421788 ;** isg LONG              **
  742. MUIA_Cycle_Entries              EQU $80420629 ;** i.. STRPTR *          **
  743.  
  744. MUIV_Cycle_ActiveNext           EQU -1
  745. MUIV_Cycle_ActivePrev           EQU -2
  746.  
  747.  
  748. ;****************************************************************************
  749. ;** Slider.mui 6.50 (26.10.93)                                             **
  750. ;****************************************************************************
  751.  
  752. ;** Attributes **
  753.  
  754. MUIA_Slider_Level               EQU $8042ae3a ;** isg LONG              **
  755. MUIA_Slider_Max                 EQU $8042d78a ;** i.. LONG              **
  756. MUIA_Slider_Min                 EQU $8042e404 ;** i.. LONG              **
  757. MUIA_Slider_Quiet               EQU $80420b26 ;** i.. BOOL              **
  758.  
  759.  
  760.  
  761. ;****************************************************************************
  762. ;** Coloradjust.mui 6.30 (26.10.93)                                        **
  763. ;****************************************************************************
  764.  
  765. ;** Attributes **
  766.  
  767. MUIA_Coloradjust_Blue           EQU $8042b8a3 ;** isg ULONG             **
  768. MUIA_Coloradjust_Green          EQU $804285ab ;** isg ULONG             **
  769. MUIA_Coloradjust_ModeID         EQU $8042ec59 ;** isg ULONG             **
  770. MUIA_Coloradjust_Red            EQU $80420eaa ;** isg ULONG             **
  771. MUIA_Coloradjust_RGB            EQU $8042f899 ;** isg ULONG *           **
  772.  
  773.  
  774.  
  775. ;****************************************************************************
  776. ;** Palette.mui 6.21 (26.10.93)                                            **
  777. ;****************************************************************************
  778.  
  779. ;** Attributes **
  780.  
  781. MUIA_Palette_Entries            EQU $8042a3d8 ;** i.g struct MUI_Palette_Entry * **
  782. MUIA_Palette_Groupable          EQU $80423e67 ;** isg BOOL              **
  783. MUIA_Palette_Names              EQU $8042c3a2 ;** isg char **           **
  784.  
  785.  
  786. ****************************************************************************
  787. **
  788. ** Macro Section
  789. ** -------------
  790. **
  791. ** To make GUI creation more easy and understandable, you can use the
  792. ** macros below. If you dont want, just define MUI_NOSHORTCUTS to disable
  793. ** them.
  794. **
  795. ** These macros are available to C programmers only.
  796. **
  797. *** NOTE: This .i file contains the corresponding macros for
  798. *** assembler programmers.  All assembler related comments are
  799. *** marked with three *'s.  The original comments and examples for
  800. *** C are still intact.
  801. **
  802. ****************************************************************************
  803.  
  804.    IFND MUI_NOSHORTCUTS
  805.  
  806.  
  807.  
  808. ****************************************************************************
  809. **
  810. ** Object Generation
  811. ** -----------------
  812. **
  813. ** The xxxObject (and xChilds) macros generate new instances of MUI classes.
  814. ** Every xxxObject can be followed by tagitems specifying initial create
  815. ** time attributes for the new object and must be terminated with the
  816. ** End macro:
  817. **
  818. ** obj = StringObject,
  819. **          MUIA_String_Contents, "foo",
  820. **          MUIA_String_MaxLen  , 40,
  821. **          End;
  822. **
  823. ** With the Child, SubWindow and WindowContents shortcuts you can
  824. ** construct a complete GUI within one command:
  825. **
  826. ** app = ApplicationObject,
  827. **
  828. **          ...
  829. **
  830. **          SubWindow, WindowObject,
  831. **             WindowContents, VGroup,
  832. **                Child, String("foo",40),
  833. **                Child, String("bar",50),
  834. **                Child, HGroup,
  835. **                   Child, CheckMark(TRUE),
  836. **                   Child, CheckMark(FALSE),
  837. **                   End,
  838. **                End,
  839. **             End,
  840. **
  841. **          SubWindow, WindowObject,
  842. **             WindowContents, HGroup,
  843. **                Child, ...,
  844. **                Child, ...,
  845. **                End,
  846. **             End,
  847. **
  848. **          ...
  849. **
  850. **          End;
  851. **
  852. ****************************************************************************
  853.  
  854.  
  855. ****************************************************************************
  856. ***
  857. *** These assembler macros behave somewhat in the same way as the C macros
  858. *** but with some minor differences:
  859. *** The macro names End, and SET are already in use in most assembler
  860. *** compilers, so they are replaced with Endi and seti (for consistencys
  861. *** sake get is also renamed to geti).
  862. ***
  863. *** You must provide memory for all the taglists needed in the object
  864. *** creation.  The maximum memory needed is passed to you in the 
  865. *** TAG_SPACE variable.  This is not the mimimum memory needed in most
  866. *** cases and is often a few kilos too large, but this is the best I
  867. *** could come up with the assembler macro commands.
  868. *** Note that you must store the value of TAG_SPACE only after all
  869. *** the objects are created.  TAG_SPACE is incremented as object
  870. *** creation macros are called and in the end holds the maximum
  871. *** theoretical tagitem space usage in bytes.  You pass the pointer to
  872. *** this memory (which you have yourself allocated) in the register MR.
  873. *** You can EQUR MR to any of the registers a3, a4 or a5 (the macros
  874. *** don't use these registers).
  875. ***
  876. *** All calls to xxxObject and xxxGroup _must_ be finished with an Endi
  877. *** call.  The Endi macro actually calls the MUI_NewObjectA function
  878. *** and places the result object to the taglist.
  879. ***
  880. *** The MUIT macro is just a handy way of moving mixed stuff to the
  881. *** taglist.  Upto 9 items can be moved to the stack on one source line.
  882. *** You can move _only constants_ with the MUIT macro, use the
  883. *** MUIT2 macro to move more mixed stuff (pointers, registers).
  884. *** Remember to use # to denote constants when using MUIT2.
  885. *** The Endi macro is a special case for the MUIT and MUIT2 macros.
  886. *** This is snooped out and every 'MUIT Endi' call is converted to
  887. *** an Endi macro call.
  888. ***
  889. *** Also the very common calls 'MUIT Child', 'MUIT SubWindow' and
  890. *** 'MUIT WindowContents' have their own macros Childi, SubWindowi
  891. *** and WindowContentsi.  Childi macro can take upto five arguments.
  892. *** There are three versions of Childi: Childi, Child2 and Child3.
  893. *** Templates for these macros are:
  894. *** Childi [macro[,argument1[,argument2[,argument3[,argument4]]]]]
  895. *** Child2 [macro[,macro[,macro[,macro[,macro]]]]]
  896. *** Child3 [macro[,macro[,argument1[,argument2[,argument3]]]]]
  897. *** Arguments for Childi are interpreted as the first one being a
  898. *** full macro name and the last four arguments for this macro.
  899. *** Arguments for Child2 are treated as macros placed on their
  900. *** own separate lines.  These macros can't have any arguments.
  901. *** Arguments for Child3 are treated as two macros placed on their
  902. *** own separate lines.  The last macro can have three arguments.
  903. ***
  904. *** The C example above with these assembler macros:
  905. ***
  906. ***   ApplicationObject
  907. ***   
  908. ***      ...
  909. ***
  910. ***      SubWindowi
  911. ***      WindowObject
  912. ***         WindowContentsi
  913. ***         VGroup
  914. ***            Childi String,foo,40
  915. ***            Childi String,bar,50
  916. ***            Childi HGroup
  917. ***               Childi Checkmark,TRUE
  918. ***               Childi Checkmark,FALSE
  919. ***               Endi
  920. ***            Endi
  921. ***         Endi
  922. ***
  923. ***      SubWindowi
  924. ***      WindowObject
  925. ***         WindowContentsi
  926. ***         HGroup
  927. ***            Childi
  928. ***            ...
  929. ***            Childi
  930. ***            ...
  931. ***            Endi
  932. ***         Endi
  933. ***
  934. ***      ...
  935. ***         
  936. ***      Endi
  937. ***      is app
  938. ***
  939. ***   app   dc.l  0
  940. ***   bar   dc.b  "bar",0
  941. ***   foo   dc.b  "foo",0
  942. ***
  943. ****************************************************************************
  944.  
  945. *** TAG_SPACE will hold the max taglist size in bytes
  946.  
  947. TAG_SPACE SET 0
  948.  
  949. *** Macros to move a tagitem to the taglist if it is given
  950.  
  951. cmv   MACRO ; Tag
  952.    IFNC  '\1',''
  953.    IFC   '\1','Endi'
  954.       Endi
  955.    ELSEIF
  956.       move.l   #\1,(MR)+
  957. TAG_SPACE SET TAG_SPACE+4
  958.    ENDC
  959.    ENDC
  960.       ENDM
  961.  
  962. cmv2  MACRO ; Tag
  963.    IFNC  '\1',''
  964.    IFC   '\1','Endi'
  965.       Endi
  966.    ELSEIF
  967.       move.l   \1,(MR)+
  968. TAG_SPACE SET TAG_SPACE+4
  969.    ENDC
  970.    ENDC
  971.       ENDM
  972.  
  973. *** Macro to move a tagitem to stack if it is given
  974.  
  975. cmv3  MACRO ; Tag
  976.    IFNC  '\1',''
  977.       move.l   \1,-(sp)
  978.    ENDC
  979.       ENDM
  980.  
  981. *** Macros to move max 9 tagitems to the taglist
  982.  
  983. MUIT  MACRO ; Tag1, [...]
  984.       cmv   \1
  985.       cmv   \2
  986.       cmv   \3
  987.       cmv   \4
  988.       cmv   \5
  989.       cmv   \6
  990.       cmv   \7
  991.       cmv   \8
  992.       cmv   \9
  993.       ENDM
  994.  
  995. MUIT2 MACRO ; Tag1, [...]
  996.       cmv2  \1
  997.       cmv2  \2
  998.       cmv2  \3
  999.       cmv2  \4
  1000.       cmv2  \5
  1001.       cmv2  \6
  1002.       cmv2  \7
  1003.       cmv2  \8
  1004.       cmv2  \9
  1005.       ENDM
  1006.  
  1007. *** DoMethod macro for easier assembler DoMethod'ing, max 20 tagitems.
  1008. *** Note that _DoMethod is defined in amiga.lib, so you must link
  1009. *** your own object code with it.
  1010.  
  1011. DoMethod    MACRO ; obj, MethodID, tag1, [...]
  1012.             movem.l  a0/a2,-(sp)
  1013.             move.l   sp,a2
  1014.             clr.l    -(sp)
  1015.             cmv3     \L
  1016.             cmv3     \K
  1017.             cmv3     \J
  1018.             cmv3     \I
  1019.             cmv3     \H
  1020.             cmv3     \G
  1021.             cmv3     \F
  1022.             cmv3     \E
  1023.             cmv3     \D
  1024.             cmv3     \C
  1025.             cmv3     \B
  1026.             cmv3     \A
  1027.             cmv3     \9
  1028.             cmv3     \8
  1029.             cmv3     \7
  1030.             cmv3     \6
  1031.             cmv3     \5
  1032.             cmv3     \4
  1033.             cmv3     \3
  1034.             cmv3     \2
  1035.             cmv3     \1
  1036.             jsr      _DoMethod
  1037.             move.l   a2,sp
  1038.             movem.l  (sp)+,a0/a2
  1039.             ENDM
  1040.  
  1041. *** MUI_Request macro for easier assembler MUI_Request'ing, max
  1042. *** 20 tagitems.
  1043.  
  1044. MUI_Request MACRO    ; app,win,flags,title,gadgets,format,[params,...]
  1045.             movem.l  a0-a4,-(sp)
  1046.             move.l   sp,a4
  1047.             cmv3     \L
  1048.             cmv3     \K
  1049.             cmv3     \J
  1050.             cmv3     \I
  1051.             cmv3     \H
  1052.             cmv3     \G
  1053.             cmv3     \F
  1054.             cmv3     \E
  1055.             cmv3     \D
  1056.             cmv3     \C
  1057.             cmv3     \B
  1058.             cmv3     \A
  1059.             cmv3     \9
  1060.             cmv3     \8
  1061.             cmv3     \7
  1062.             move.l   a4,a3
  1063.             move.l   #\6,a2
  1064.             move.l   #\5,a1
  1065.             move.l   #\4,a0
  1066.             move.l   #\3,d2
  1067.             move.l   \2,d1
  1068.             move.l   \1,d0
  1069.             CALLMUI  MUI_RequestA
  1070.             move.l   a4,sp
  1071.             movem.l  (sp)+,a0-a4
  1072.             ENDM
  1073.  
  1074. *** Macro for getting a pointer to an object you just created.
  1075. *** This is valid only after an Endi macro.
  1076.  
  1077. is          MACRO    ; pointer
  1078.             move.l   d0,\1
  1079.             ENDM
  1080.  
  1081. WindowObject         MACRO
  1082.                      movem.l  a0/a2,-(sp)
  1083.                      move.l   MUIC_Window,a0
  1084.                      move.l   a4,a2
  1085.                      ENDM
  1086. Endi                 MACRO
  1087.                      clr.l    (MR)+
  1088.                      move.l   a2,a1
  1089.                      CALLMUI  MUI_NewObjectA
  1090.                      move.l   a2,a4
  1091.                      movem.l  (sp)+,a0/a2
  1092.                      cmv2     d0
  1093.                      ENDM
  1094. ImageObject          MACRO
  1095.                      movem.l  a0/a2,-(sp)
  1096.                      move.l   MUIC_Image,a0
  1097.                      move.l   a4,a2
  1098.                      ENDM
  1099. NotifyWindowObject   MACRO
  1100.                      movem.l  a0/a2,-(sp)
  1101.                      move.l   MUIC_Notify,a0
  1102.                      move.l   a4,a2
  1103.                      ENDM
  1104. ApplicationObject    MACRO
  1105.                      movem.l  a0/a2,-(sp)
  1106.                      move.l   MUIC_Application,a0
  1107.                      move.l   a4,a2
  1108.                      ENDM
  1109. TextObject           MACRO
  1110.                      movem.l  a0/a2,-(sp)
  1111.                      move.l   MUIC_Text,a0
  1112.                      move.l   a4,a2
  1113.                      ENDM
  1114. RectangleObject      MACRO
  1115.                      movem.l  a0/a2,-(sp)
  1116.                      move.l   MUIC_Rectangle,a0
  1117.                      move.l   a4,a2
  1118.                      ENDM
  1119. ListObject           MACRO
  1120.                      movem.l  a0/a2,-(sp)
  1121.                      move.l   MUIC_List,a0
  1122.                      move.l   a4,a2
  1123.                      ENDM
  1124. PropObject           MACRO
  1125.                      movem.l  a0/a2,-(sp)
  1126.                      move.l   MUIC_Prop,a0
  1127.                      move.l   a4,a2
  1128.                      ENDM
  1129. StringObject         MACRO
  1130.                      movem.l  a0/a2,-(sp)
  1131.                      move.l   MUIC_String,a0
  1132.                      move.l   a4,a2
  1133.                      ENDM
  1134. ScrollbarObject      MACRO
  1135.                      movem.l  a0/a2,-(sp)
  1136.                      move.l   MUIC_Scrollbar,a0
  1137.                      move.l   a4,a2
  1138.                      ENDM
  1139. ListviewObject       MACRO
  1140.                      movem.l  a0/a2,-(sp)
  1141.                      move.l   MUIC_Listview,a0
  1142.                      move.l   a4,a2
  1143.                      ENDM
  1144. RadioObject          MACRO
  1145.                      movem.l  a0/a2,-(sp)
  1146.                      move.l   MUIC_Radio,a0
  1147.                      move.l   a4,a2
  1148.                      ENDM
  1149. VolumelistObject     MACRO
  1150.                      movem.l  a0/a2,-(sp)
  1151.                      move.l   MUIC_Volumelist,a0
  1152.                      move.l   a4,a2
  1153.                      ENDM
  1154. FloattextObject      MACRO
  1155.                      movem.l  a0/a2,-(sp)
  1156.                      move.l   MUIC_Floattext,a0
  1157.                      move.l   a4,a2
  1158.                      ENDM
  1159. DirlistObject        MACRO
  1160.                      movem.l  a0/a2,-(sp)
  1161.                      move.l   MUIC_Dirlist,a0
  1162.                      move.l   a4,a2
  1163.                      ENDM
  1164. ApplistObject        MACRO
  1165.                      movem.l  a0/a2,-(sp)
  1166.                      move.l   MUIC_Applist,a0
  1167.                      move.l   a4,a2
  1168.                      ENDM
  1169. DatatypeObject       MACRO
  1170.                      movem.l  a0/a2,-(sp)
  1171.                      move.l   MUIC_Datatype,a0
  1172.                      move.l   a4,a2
  1173.                      ENDM
  1174. SliderObject         MACRO
  1175.                      movem.l  a0/a2,-(sp)
  1176.                      move.l   MUIC_Slider,a0
  1177.                      move.l   a4,a2
  1178.                      ENDM
  1179. CycleObject          MACRO
  1180.                      movem.l  a0/a2,-(sp)
  1181.                      move.l   MUIC_Cycle,a0
  1182.                      move.l   a4,a2
  1183.                      ENDM
  1184. GaugeObject          MACRO
  1185.                      movem.l  a0/a2,-(sp)
  1186.                      move.l   MUIC_Gauge,a0
  1187.                      move.l   a4,a2
  1188.                      ENDM
  1189. ScaleObject          MACRO
  1190.                      movem.l  a0/a2,-(sp)
  1191.                      move.l   MUIC_Scale,a0
  1192.                      move.l   a4,a2
  1193.                      ENDM
  1194. BoopsiObject         MACRO
  1195.                      movem.l  a0/a2,-(sp)
  1196.                      move.l   MUIC_Boopsi,a0
  1197.                      move.l   a4,a2
  1198.                      ENDM
  1199. GroupObject          MACRO
  1200.                      movem.l  a0/a2,-(sp)
  1201.                      move.l   MUIC_Group,a0
  1202.                      move.l   a4,a2
  1203.                      ENDM
  1204. VGroup               MACRO
  1205.                      movem.l  a0/a2,-(sp)
  1206.                      move.l   MUIC_Group,a0
  1207.                      move.l   a4,a2
  1208.                      ENDM
  1209. HGroup               MACRO
  1210.                      movem.l  a0/a2,-(sp)
  1211.                      move.l   MUIC_Group,a0
  1212.                      move.l   a4,a2
  1213.                      MUIT     MUIA_Group_Horiz,TRUE
  1214.                      ENDM
  1215. ColGroup             MACRO ; cols
  1216.                      movem.l  a0/a2,-(sp)
  1217.                      move.l   MUIC_Group,a0
  1218.                      move.l   a4,a2
  1219.                      MUIT     MUIA_Group_Columns,\1
  1220.                      ENDM
  1221. RowGroup             MACRO ; rows
  1222.                      movem.l  a0/a2,-(sp)
  1223.                      move.l   MUIC_Group,a0
  1224.                      move.l   a4,a2
  1225.                      MUIT     MUIA_Group_Rows,\1
  1226.                      ENDM
  1227.  
  1228. Childi               MACRO ; [macro[,argument1[,argument2[,argument3[,argument4]]]]]
  1229.                      cmv   MUIA_Group_Child
  1230.                      \1 \2,\3,\4,\5
  1231.                      ENDM
  1232. Child2               MACRO ; [macro[,macro[,macro[,macro[,macro]]]]]
  1233.                      cmv   MUIA_Group_Child
  1234.                      \1
  1235.                      \2
  1236.                      \3
  1237.                      \4
  1238.                      \5
  1239.                      ENDM
  1240. Child3               MACRO ; [macro[,macro[,argument1[,argument2[,argument3]]]]]
  1241.                      cmv   MUIA_Group_Child
  1242.                      \1
  1243.                      \2 \3,\4,\5
  1244.                      ENDM
  1245. SubWindowi           MACRO
  1246.                      cmv   MUIA_Application_Window
  1247.                      ENDM
  1248. WindowContentsi      MACRO
  1249.                      cmv   MUIA_Window_RootObject
  1250.                      ENDM
  1251.  
  1252.  
  1253. Child          EQU   MUIA_Group_Child
  1254. SubWindow      EQU   MUIA_Application_Window
  1255. WindowContents EQU   MUIA_Window_RootObject
  1256.  
  1257.  
  1258.  
  1259. ****************************************************************************
  1260. **
  1261. ** Frame Types
  1262. ** -----------
  1263. **
  1264. ** These macros may be used to specify one of MUI's different frame types.
  1265. ** Note that every macro consists of one or more { ti_Tag, ti_Data }
  1266. ** pairs.
  1267. **
  1268. ** GroupFrameT() is a special kind of frame that contains a centered
  1269. ** title text.
  1270. **
  1271. ** HGroup, GroupFrameT("Horiz Groups"),
  1272. **    Child, RectangleObject, TextFrame  , End,
  1273. **    Child, RectangleObject, StringFrame, End,
  1274. **    Child, RectangleObject, ButtonFrame, End,
  1275. **    Child, RectangleObject, ListFrame  , End,
  1276. **    End,
  1277. **
  1278. ****************************************************************************
  1279.  
  1280. ****************************************************************************
  1281. ***
  1282. *** Assembler version of the above C example:
  1283. ***
  1284. *** HGroup
  1285. ***    GroupFrameT horizg
  1286. ***    Child2 RectangleObject,TextFrame,Endi
  1287. ***    Child2 RectangleObject,StringFrame,Endi
  1288. ***    Child2 RectangleObject,ButtonFrame,Endi
  1289. ***    Child2 RectangleObject,ListFrame,Endi
  1290. ***    Endi
  1291. ***
  1292. *** horizg  dc.b  "Horiz Groups",0
  1293. ***         even
  1294. ***
  1295. ****************************************************************************
  1296.  
  1297. *** These macros call MUIT themselves, do not use eg. 'MUIT NoFrame'
  1298.  
  1299. NoFrame     MACRO
  1300.             MUIT  MUIA_Frame,MUIV_FrameNone
  1301.             ENDM
  1302. ButtonFrame MACRO
  1303.             MUIT  MUIA_Frame,MUIV_FrameButton
  1304.             ENDM
  1305. ImageButtonFrame  MACRO
  1306.             MUIT  MUIA_Frame,MUIV_FrameImageButton
  1307.             ENDM
  1308. TextFrame   MACRO
  1309.             MUIT  MUIA_Frame,MUIV_FrameText
  1310.             ENDM
  1311. StringFrame MACRO
  1312.             MUIT  MUIA_Frame,MUIV_FrameString
  1313.             ENDM
  1314. ReadListFrame  MACRO
  1315.             MUIT  MUIA_Frame,MUIV_FrameReadList
  1316.             ENDM
  1317. InputListFrame MACRO
  1318.             MUIT  MUIA_Frame,MUIV_FrameInputList
  1319.             ENDM
  1320. PropFrame   MACRO
  1321.             MUIT  MUIA_Frame,MUIV_FrameProp
  1322.             ENDM
  1323. GaugeFrame  MACRO
  1324.             MUIT  MUIA_Frame,MUIV_FrameGauge
  1325.             ENDM
  1326. GroupFrame  MACRO
  1327.             MUIT  MUIA_Frame,MUIV_FrameGroup
  1328.             ENDM
  1329. GroupFrameT MACRO ; s
  1330.             MUIT  MUIA_Frame,MUIV_FrameGroup,MUIA_FrameTitle,\1
  1331.             ENDM
  1332.  
  1333.  
  1334.  
  1335. ****************************************************************************
  1336. **
  1337. ** Spacing Macros
  1338. ** --------------
  1339. **
  1340. ****************************************************************************
  1341.  
  1342. *** For these macros tagitem space is allocated from the stack and is
  1343. *** fixed in size.  So, there is no need for a separate Endi call.
  1344.  
  1345. HVSpace     MACRO
  1346.             move.l   a0,-(sp)
  1347.             move.l   MUIC_Rectangle,a0
  1348.             clr.l    -(sp)
  1349.             move.l   sp,a1
  1350.             CALLMUI  MUI_NewObjectA
  1351.             addq.l   #4,sp
  1352.             move.l   (sp)+,a0
  1353.             MUIT2    d0
  1354.             ENDM
  1355.    
  1356. HSpace      MACRO ; x
  1357.             move.l   a0,-(sp)
  1358.             move.l   MUIC_Rectangle,a0
  1359.             clr.l    -(sp)
  1360.             clr.l    -(sp)
  1361.             pea      MUIA_VertWeight
  1362.             move.l   #\1,-(sp)
  1363.          IFND  \1
  1364.             pea      MUIA_FixWidth
  1365.          ELSEIF
  1366.             pea      1.w
  1367.          ENDC
  1368.             move.l   sp,a1
  1369.             CALLMUI  MUI_NewObjectA
  1370.             lea      20(sp),sp
  1371.             move.l   (sp)+,a0
  1372.             MUIT2    d0
  1373.             ENDM
  1374.  
  1375. VSpace      MACRO ; x
  1376.             move.l   a0,-(sp)
  1377.             move.l   MUIC_Rectangle,a0
  1378.             clr.l    -(sp)
  1379.             clr.l    -(sp)
  1380.             pea      MUIA_HorizWeight
  1381.             move.l   #\1,-(sp)
  1382.          IFND  \1
  1383.             pea      MUIA_FixHeight
  1384.          ELSEIF
  1385.             pea      1.w
  1386.          ENDC
  1387.             move.l   sp,a1
  1388.             CALLMUI  MUI_NewObjectA
  1389.             lea      20(sp),sp
  1390.             move.l   (sp)+,a0
  1391.             MUIT2    d0
  1392.             ENDM
  1393.  
  1394. HCenter     MACRO ; obj
  1395.             HGroup
  1396.                GroupSpacing 0
  1397.                Childi HSpace,0
  1398.                Childi MUIT2,\1
  1399.                Childi HSpace,0
  1400.                Endi
  1401.             ENDM
  1402.  
  1403. VCenter     MACRO ; obj
  1404.             VGroup
  1405.                GroupSpacing 0
  1406.                Childi VSpace,0
  1407.                Childi MUIT2,\1
  1408.                Childi VSpace,0
  1409.                Endi
  1410.             ENDM
  1411.  
  1412. InnerSpacing   MACRO ; h,v
  1413.                MUIT MUIA_InnerLeft,\1,MUIA_InnerRight,\1,MUIA_InnerTop,\2,MUIA_InnerBottom,\2
  1414.                ENDM
  1415.  
  1416. GroupSpacing   MACRO ; x
  1417.                MUIT  MUIA_Group_Spacing,\1
  1418.                ENDM
  1419.  
  1420.  
  1421.  
  1422. ****************************************************************************
  1423. ***
  1424. *** You use these assembler macros like this:
  1425. ***
  1426. *** String mystr1,40
  1427. ***
  1428. *** CheckMark TRUE
  1429. ***
  1430. *** SimpleButton mysbut1
  1431. ***
  1432. *** KeyButton mykbut1,"c"
  1433. ***
  1434. *** Cycle myentr1
  1435. ***
  1436. *** KeyCycle myentr1,"k"
  1437. ***
  1438. *** Radio rname1,rbuts1
  1439. ***
  1440. *** String mystr1,35
  1441. *** is strobj1
  1442. *** Popup ST_Font,strobj1,MyHook,MUII_Popup
  1443. ***
  1444. ***
  1445. *** MyHook  rts   ; dummy hook, does nothing
  1446. *** mysrt1  dc.b  "String contents",0
  1447. ***         even
  1448. *** mysbut1 dc.b  "Button",0
  1449. ***         even
  1450. *** mykbut1 dc.b  "Cancel",0
  1451. ***         even
  1452. *** myentr1 dc.l  entrs1,entrs2,entrs3,NULL
  1453. *** entrs1  dc.b  "One",0
  1454. *** entrs2  dc.b  "Two",0
  1455. *** entrs3  dc.b  "Three",0
  1456. ***         even
  1457. *** rname1  dc.b  "Radio Buttons:",0
  1458. ***         even
  1459. *** rbuts1  dc.l  rbut1,rbut2,rbut3,NULL
  1460. *** rbut1   dc.b  "Button1",0
  1461. ***         even
  1462. *** rbut2   dc.b  "Button2",0
  1463. ***         even
  1464. *** rbut3   dc.b  "Button3",0
  1465. ***         even
  1466. *** strobj  dc.l  0
  1467. *** ST_Font dc.l  0
  1468. ***
  1469. ***
  1470. ****************************************************************************
  1471.  
  1472. ****************************************************************************
  1473. **
  1474. ** String-Object
  1475. ** -------------
  1476. **
  1477. ** The following macro creates a simple string gadget.
  1478. **
  1479. ****************************************************************************
  1480.  
  1481. String MACRO ; contents,maxlen
  1482.    StringObject
  1483.       StringFrame
  1484.       MUIT MUIA_String_MaxLen,\2
  1485.       MUIT MUIA_String_Contents,\1
  1486.       Endi
  1487.    ENDM
  1488.  
  1489.  
  1490. ****************************************************************************
  1491. **
  1492. ** CheckMark-Object
  1493. ** ----------------
  1494. **
  1495. ** The following macro creates a checkmark gadget.
  1496. **
  1497. ****************************************************************************
  1498.  
  1499. CheckMark MACRO ; selected
  1500.    ImageObject
  1501.       ImageButtonFrame
  1502.       MUIT MUIA_InputMode,MUIV_InputModeToggle
  1503.       MUIT MUIA_Image_Spec,MUII_CheckMark
  1504.       MUIT MUIA_Image_FreeVert,TRUE
  1505.       MUIT MUIA_Selected,\1
  1506.       MUIT MUIA_Background,MUII_ButtonBack
  1507.       MUIT MUIA_ShowSelState,FALSE
  1508.       Endi
  1509.    ENDM
  1510.  
  1511.  
  1512. ****************************************************************************
  1513. **
  1514. ** Button-Objects
  1515. ** --------------
  1516. **
  1517. ** Note: Use small letters for KeyButtons, e.g.
  1518. **       KeyButton("Cancel",'c')  and not  KeyButton("Cancel",'C') !!
  1519. **
  1520. ****************************************************************************
  1521.  
  1522. SimpleButton MACRO ; name
  1523.    TextObject
  1524.       ButtonFrame
  1525.       MUIT MUIA_Text_Contents,\1
  1526.       MUIT MUIA_Text_PreParse,PreParse
  1527.       MUIT MUIA_Text_SetMax,FALSE
  1528.       MUIT MUIA_InputMode,MUIV_InputModeRelVerify
  1529.       MUIT MUIA_Background,MUII_ButtonBack
  1530.       Endi
  1531.    ENDM
  1532.  
  1533. KeyButton MACRO ; name,key
  1534.    TextObject
  1535.       ButtonFrame
  1536.       MUIT MUIA_Text_Contents,\1
  1537.       MUIT MUIA_Text_PreParse,PreParse
  1538.       MUIT MUIA_Text_SetMax,FALSE
  1539.       MUIT MUIA_Text_HiChar,\2
  1540.       MUIT MUIA_ControlChar,\2
  1541.       MUIT MUIA_InputMode,MUIV_InputModeRelVerify
  1542.       MUIT MUIA_Background,MUII_ButtonBack
  1543.       Endi
  1544.    ENDM
  1545.  
  1546.  
  1547.  
  1548. ****************************************************************************
  1549. **
  1550. ** Cycle-Object
  1551. ** ------------
  1552. **
  1553. ****************************************************************************
  1554.  
  1555. Cycle MACRO ; entries
  1556.    CycleObject
  1557.       MUIT MUIA_Cycle_Entries,\1
  1558.       Endi
  1559.    ENDM
  1560.  
  1561. KeyCycle MACRO ; entries,key
  1562.    CycleObject
  1563.       MUIT  MUIA_Cycle_Entries,\1,MUIA_ControlChar,\2
  1564.       Endi
  1565.    ENDM
  1566.  
  1567.  
  1568.  
  1569. ****************************************************************************
  1570. **
  1571. ** Radio-Object
  1572. ** ------------
  1573. **
  1574. ****************************************************************************
  1575.  
  1576. Radio MACRO ; name,array
  1577.    RadioObject
  1578.       GroupFrameT \1
  1579.       MUIT  MUIA_Radio_Entries,\2
  1580.       Endi
  1581.    ENDM
  1582.  
  1583.  
  1584.  
  1585. ****************************************************************************
  1586. **
  1587. ** Popup-Object
  1588. ** ------------
  1589. **
  1590. ** An often needed GUI element is a string gadget with a little button
  1591. ** that opens up a (small) window with a list containing possible entries
  1592. ** for this gadget. Together with the Popup and the String macro,
  1593. ** such a thing would look like
  1594. **
  1595. ** VGroup,
  1596. **    Child, Popup(ST_Font, String("helvetica/13",32), &Hook, MUII_Popup),
  1597. **    ...,
  1598. **
  1599. ** ST_Font will hold a pointer to the embedded string gadget and can
  1600. ** be used to set and get its contents as with every other string object.
  1601. **
  1602. ** The hook will be called with the string gadget as object whenever
  1603. ** the user releases the popup button and could look like this:
  1604. **
  1605. ** ULONG __asm __saveds HookFunc(register __a2 APTR obj,MUII_File)
  1606. ** {
  1607. **    ...
  1608. **
  1609. **    // put our application to sleep while displaying the requester
  1610. **    set(Application,MUIA_Application_Sleep,TRUE);
  1611. **
  1612. **    // get the calling objects window and position
  1613. **    get(obj,MUIA_Window  ,&window);
  1614. **    get(obj,MUIA_LeftEdge,&l);
  1615. **    get(obj,MUIA_TopEdge ,&t);
  1616. **    get(obj,MUIA_Width   ,&w);
  1617. **    get(obj,MUIA_Height  ,&h);
  1618. **
  1619. **    if (req=MUI_AllocAslRequestTags(ASL_FontRequest,TAG_DONE))
  1620. **    {
  1621. **       if (MUI_AslRequestTags(req,
  1622. **          ASLFO_Window         ,window,
  1623. **          ASLFO_PrivateIDCMP   ,TRUE,
  1624. **          ASLFO_TitleText      ,"Select Font",
  1625. **          ASLFO_InitialLeftEdge,window->LeftEdge + l,
  1626. **          ASLFO_InitialTopEdge ,window->TopEdge  + t+h,
  1627. **          ASLFO_InitialWidth   ,w,
  1628. **          ASLFO_InitialHeight  ,250,
  1629. **          TAG_DONE))
  1630. **       {
  1631. **          // set the new contents for our string gadget
  1632. **          set(obj,MUIA_String_Contents,req->fo_Attr.ta_Name);
  1633. **       }
  1634. **       MUI_FreeAslRequest(req);
  1635. **    }
  1636. **
  1637. **    // wake up our application again
  1638. **    set(Application,MUIA_Application_Sleep,FALSE);
  1639. **
  1640. **    return(0);
  1641. ** }
  1642. **
  1643. ** Note: This macro needs a "APTR dummy;" declaration somewhere in your
  1644. **       code to work.
  1645. **
  1646. ****************************************************************************
  1647.  
  1648. Popup MACRO ; ptr,obj,hook,img
  1649.    HGroup
  1650.       GroupSpacing 1
  1651.       MUIT2 #Child,\2
  1652.       move.l   \2,\1
  1653.       Child2 ImageObject,ImageButtonFrame
  1654.          MUIT MUIA_Image_Spec,\4
  1655.          MUIT MUIA_Image_FontMatchWidth,TRUE
  1656.          MUIT MUIA_Image_FreeVert,TRUE
  1657.          MUIT MUIA_InputMode,MUIV_InputModeRelVerify
  1658.          MUIT MUIA_Background,MUII_BACKGROUND
  1659.          Endi
  1660.       move.l   (sp),dummy
  1661.       MUIT TAG_IGNORE
  1662.       tst.l dummy
  1663.       beq.b pop\@
  1664.       tst.l \1
  1665.       beq.b pop\@
  1666.       DoMethod dummy,#MUIM_Notify,#MUIA_Pressed,#FALSE,\1,#2,#MUIM_CallHook,\2
  1667.       MUIT2 d0
  1668.       bra.b pup\@
  1669. pop\@ MUIT  0
  1670. pup\@ Endi
  1671.    ENDM
  1672.  
  1673.  
  1674.  
  1675. ****************************************************************************
  1676. **
  1677. ** Labeling Objects
  1678. ** ----------------
  1679. **
  1680. ** Labeling objects, e.g. a group of string gadgets,
  1681. **
  1682. **   Small: |foo   |
  1683. **  Normal: |bar   |
  1684. **     Big: |foobar|
  1685. **    Huge: |barfoo|
  1686. **
  1687. ** is done using a 2 column group:
  1688. **
  1689. ** ColGroup(2),
  1690. **    Child, Label2("Small:" ),
  1691. **    Child, StringObject, End,
  1692. **    Child, Label2("Normal:"),
  1693. **    Child, StringObject, End,
  1694. **    Child, Label2("Big:"   ),
  1695. **    Child, StringObject, End,
  1696. **    Child, Label2("Huge:"  ),
  1697. **    Child, StringObject, End,
  1698. **    End,
  1699. **
  1700. ** Note that we have three versions of the label macro, depending on
  1701. ** the frame type of the right hand object:
  1702. **
  1703. ** Label1(): For use with standard frames (e.g. checkmarks).
  1704. ** Label2(): For use with double high frames (e.g. string gadgets).
  1705. ** Label() : For use with objects without a frame.
  1706. **
  1707. ** These macros ensure that your label will look fine even if the
  1708. ** user of your application configured some strange spacing values.
  1709. ** If you want to use your own labeling, you'll have to pay attention
  1710. ** on this topic yourself.
  1711. **
  1712. ****************************************************************************
  1713.  
  1714. ****************************************************************************
  1715. ***
  1716. *** And the above C example in assembler:
  1717. ***
  1718. *** ColGroup 2
  1719. ***   Childi Label2,small
  1720. ***   Child2 StringObject,Endi
  1721. ***   Childi Label2,normal
  1722. ***   Child2 StringObject,Endi
  1723. ***   Childi Label2,big
  1724. ***   Child2 StringObject,Endi
  1725. ***   Childi Label2,huge
  1726. ***   Child2 StringObject,Endi
  1727. ***   Endi
  1728. ***
  1729. *** small   dc.b  "Small:",0
  1730. ***         even
  1731. *** normal  dc.b  "Normal:",0
  1732. ***         even
  1733. *** big     dc.b  "Big:",0
  1734. ***         even
  1735. *** huge    dc.b  "Huge:",0
  1736. ***         even
  1737. ***
  1738. ****************************************************************************
  1739.  
  1740. Label MACRO ; label
  1741.    TextObject
  1742.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1743.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1744.       Endi
  1745.    ENDM
  1746.  
  1747. Label1 MACRO ; label
  1748.    TextObject
  1749.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1750.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1751.       ButtonFrame
  1752.       MUIT MUIA_FramePhantomHoriz,TRUE
  1753.       Endi
  1754.    ENDM
  1755.  
  1756. Label2 MACRO ; label
  1757.    TextObject
  1758.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1,
  1759.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1760.       StringFrame
  1761.       MUIT MUIA_FramePhantomHoriz,TRUE
  1762.       Endi
  1763.    ENDM
  1764.  
  1765. KeyLabel MACRO ; label,hichar
  1766.    TextObject
  1767.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1768.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0,
  1769.       MUIT MUIA_Text_HiChar,\2
  1770.       Endi
  1771.    ENDM
  1772.  
  1773. KeyLabel1 MACRO ; label,hichar
  1774.    TextObject
  1775.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1776.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1777.       MUIT MUIA_Text_HiChar,\2
  1778.       ButtonFrame
  1779.       MUIT MUIA_FramePhantomHoriz,TRUE
  1780.       Endi
  1781.    ENDM
  1782.  
  1783. KeyLabel2 MACRO ; label,hichar
  1784.    TextObject
  1785.       MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1
  1786.       MUIT MUIA_Weight,0,MUIA_InnerLeft,0,MUIA_InnerRight,0
  1787.       MUIT MUIA_Text_HiChar,\2
  1788.       StringFrame
  1789.       MUIT MUIA_FramePhantomHoriz,TRUE
  1790.       Endi
  1791.    ENDM
  1792.  
  1793.  
  1794.  
  1795. ****************************************************************************
  1796. **
  1797. ** Controlling Objects
  1798. ** -------------------
  1799. **
  1800. ** set() and get() are two short stubs for BOOPSI GetAttr() and SetAttrs()
  1801. ** calls:
  1802. **
  1803. ** {
  1804. **    char *x;
  1805. **
  1806. **    set(obj,MUIA_String_Contents,"foobar");
  1807. **    get(obj,MUIA_String_Contents,&x);
  1808. **
  1809. **    printf("gadget contains '%s'\n",x);
  1810. ** }
  1811. **
  1812. ****************************************************************************
  1813.  
  1814. ****************************************************************************
  1815. ***
  1816. *** And the above C example in assembler:
  1817. ***
  1818. *** seti obj,#MUIA_String_Contents,#foobar
  1819. *** geti obj,#MUIA_String_Contents,#x
  1820. ***   move.l   #myfmt,d1
  1821. ***   move.l   #data,d2
  1822. ***   CALLDOS VPrintf
  1823. ***
  1824. *** foobar     dc.b  "foobar",0
  1825. ***            even
  1826. *** data       dc.l  x
  1827. *** x          dcb.b 10
  1828. *** myfmt      dc.b  "gadget contains '%s'",10,0
  1829. ***            even
  1830. ***
  1831. *** The names of the set and get macros have been changed to seti and geti
  1832. *** since most assemblers already have the pseudo op-code SET.
  1833. *** Note that seti is designed to take multiple tagitems (max 8).
  1834. ***
  1835. ****************************************************************************
  1836.  
  1837. geti  MACRO ; obj,attr,store
  1838.       move.l   \2,d0
  1839.       move.l   \1,a0
  1840.       move.l   \3,a1
  1841.       CALLINT GetAttr
  1842.       ENDM
  1843. seti  MACRO ; obj,attr,value [,attr,value,...]
  1844.       move.l   sp,a2
  1845.       cmv3     #TAG_DONE
  1846.       cmv3     \9
  1847.       cmv3     \8
  1848.       cmv3     \7
  1849.       cmv3     \6
  1850.       cmv3     \5
  1851.       cmv3     \4
  1852.       cmv3     \3
  1853.       cmv3     \2
  1854.       move.l   \1,a0
  1855.       move.l   sp,a1
  1856.       CALLINT SetAttrsA
  1857.       move.l   a2,sp
  1858.       ENDM
  1859.  
  1860. setmutex MACRO ; obj,n
  1861.       seti \1,#MUIA_Radio_Active,\2
  1862.       ENDM
  1863. setcycle MACRO ; obj,n
  1864.       seti \1,#MUIA_Cycle_Active,\2
  1865.       ENDM
  1866. setstring MACRO ; obj,s
  1867.       seti \1,#MUIA_String_Contents,\2
  1868.       ENDM
  1869. setcheckmark MACRO ; obj,b
  1870.       seti \1,#MUIA_Selected,\2
  1871.       ENDM
  1872. setslider MACRO ; obj,l
  1873.       seti \1,#MUIA_Slider_Level,\2
  1874.       ENDM
  1875.  
  1876.  
  1877.    ENDC  ;MUI_NOSHORTCUTS
  1878.  
  1879.    ENDC  ;LIBRARIES_MUI_I
  1880.